#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
	int num = 100;
	while (num <= 999) {
		int a = num / 100;
		int b = num / 10 % 10;
		int c = num % 10;
		int sum = a * a * a + b * b * b + c * c * c;
		if (sum == num) {
			printf("%d\n", num);
		}num++;
	}

	return 0;
}